feat: add 'Hide Icon on Close' setting and related functionality #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds a new "Hide Icon on Close" feature that allows users to hide the app icon from the dock when the main window is closed, while keeping the app running in the system tray. The implementation includes both frontend UI changes and backend logic, with platform-specific support for macOS. The most important changes are grouped below.
Feature Implementation: Hide Icon on Close
hide_icon_on_closesetting toAppSettingsand ensured it is properly handled in defaults and serialization insrc-tauri/src/lib.rs. [1] [2]hide_icon_on_closeis enabled, using the newset_dock_visibilitycommand. [1] [2]set_dock_visibilitycommand for use in the app, enabling dock visibility toggling from both backend and frontend.Frontend UI & Settings Management
src/index.html, with a description of its behavior.SettingsManagerinsrc/managers/settings-manager.jsto support loading, saving, and toggling the new setting, including user feedback and auto-save logic. [1] [2] [3] [4]Platform Support
cocoaandobjcdependencies tosrc-tauri/Cargo.tomlto enable macOS-specific dock visibility control.These changes collectively provide a seamless user experience for controlling the app's dock visibility when closing the window, with robust settings management and cross-platform considerations.